date <- c("20251001","20251002","20251003","20251004","20251005","20251006","20251007","20251008","20251009","20251010","20251011","20251012","20251013","20251014","20251015","20251016","20251017","20251018","20251019","20251020","20251021","20251022","20251023","20251024","20251025","20251026","20251027","20251028","20251029","20251030","20251031")
PRbpm1 <- c(63,62,60,57,58,57,54,57,54,59,56,62,64,60,64,60,78,72,69,64,65,69,68,67,67,58,63,60,64,61,62)
PRbpm2 <- c(87,82,78,74,83,81,80,78,83,80,85,93,83,81,87,102,108,108,100,97,95,91,93,92,89,85,86,93,94,86,90)
PRbpm3 <- c(NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,145,NA,139,NA,NA,NA,110,133,125,142,NA,NA,128)
endheartrate <- c(98,91,93,89,86,85,88,89,90,97,90,94,92,90,99,110,94,112,101,102,101,95,96,96,89,92,92,100,104,96,93)
plot(c(1:31),PRbpm1,type="s",col="red",xaxt="n",xlab = "date",ylab="heart rate",ylim=range(50:160))
lines(c(1:31),PRbpm2,type="s",col="blue")
lines(c(1:31),PRbpm3,type="s",col="gold")
lines(c(1:31),endheartrate,type="s",col="green")
legend("topleft",inset=.05,title="心率曲线",c("起床血氧仪(辅助线:50~65)","运动后血氧仪","运动后把脉","散步后血氧仪"),lty=c(1,1,1,1),col=c("red","blue","green","gold"))
abline(h = 65,col="red",lty = 3)
abline(h = 50,col="red",lty = 3)
axis(1, c(1:31),date)
